import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/HomepageView.vue')
    },
    {
      path: '/LoginView',
      name: 'LoginView',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/UserView',
      name: 'UserView',
      component: () => import('../views/UserView.vue')
    },
    {
      path: '/CinemaView',
      name: 'CinemaView',
      props:true,
      component: () => import('../views/MovieViews/CinemaView.vue')
    },
    {
      path: '/FilmDetailsView/:filmid',
      name: 'FilmDetailsView',
      props:true,
      component: () => import('../views/MovieViews/FilmDetailsView.vue')
    },
    {
      path: '/FilmView',
      name: 'FilmView',
      props:true,
      component: () => import('../views/MovieViews/FilmView.vue')
    },
    {
      path: '/MarkSheet/:filmid',
      name: 'MarkSheet',
      props:true,
      component: () => import('../components/MovieComponents/MarkSheet.vue')
    },
    {
      path: '/SearchBar',
      name: 'SearchBar',
      component: () => import('../components/homepageComponents/SearchBar.vue')
    },
    {
      path: '/TabNavi',
      name: 'TabNavi',
      component: () => import('../components/homepageComponents/TabNav.vue')
    },
    {
      path: '/Comment',
      name: 'Comment',
      component: () => import('../views/CommentView.vue')
    },
    {
      path: '/SearchView',
      name: 'SearchView',
      component: () => import('../views/SearchView.vue')
    },
    {  //配置功能栏路由
      path: '/functionbar',
      name: 'functionbar',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/Functionbar.vue')
    },
    {  //配置轮播图的路由
      path: '/performance-swiper',
      name: 'performance-swiper',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/PerformanceSwiper.vue')
    },
    {  //配置演出详情的路由
      path: '/performance-detail',
      name: 'performance-detail',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/PerformanceDetail.vue')
    },
    {  //配置演出推荐部分的路由
      path: '/performance-recommend',
      name: 'performance-recommend',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/PerformanceRecommend.vue')
    },
    {  //配置顶部分类导航栏的路由
      path: '/CategoryNavigationBar',
      name: 'CategoryNavigationBar',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/CategoryNavigationBar.vue')
    },
    {  //配置购票的路由
      path: '/buy-ticket',
      name: 'buy-ticket',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/BuyTicket.vue')
    },
    {  //配置演出订单的路由
      path: '/performance-order',
      name: 'performance-order',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/PerformanceOrder.vue')
    },
    {  //配置搜索页面的路由
      path: '/performance-search',
      name: 'performance-search',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../components/PerformanceComponents/PerformanceSearch.vue')
    },
    {  //配置演出整体页面的路由
      path: '/performance-show',
      name: 'performance-show',
      props: route => ({
        userId: route.query.userId
      }),
      component: () => import('../views/PerformanceShowView.vue')
    },
    {
      path: '/movieScheduling',
      name: 'movieScheduling',
      component: () => import('../views/MovieSchedulingViews/MovieScheduling.vue')
    },
    {
      path: '/chooseSeat',
      name: 'chooseSeat',
      component: () => import('../views/MovieSchedulingViews/ChooseSeat.vue')
    },
    {
      path: '/moviePayOrder',
      name: 'moviePayOrder',
      component: () => import('../views/MovieSchedulingViews/MoviePayOrder.vue')
    },
    {
      path: '/streetFood',
      name: 'streetFood',
      component: () => import('../views/MovieSchedulingViews/StreetFood.vue')
    },
    {
      path: '/orderView',
      name: 'orderView',
      component: () => import('../views/OrderView.vue')
    },
    {
      path: '/qiyu',
      name: 'qiyu',
      component: () => import('../views/QiYu.vue')
    }
  ],
})

export default router
